<%--品牌详细页--%>
<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading entityName="${brand.brandName}" entityHeadingKey="brandDetail.heading" />
<content tag="buttons">
	<probiz:iconBtn btnType="save" onclick="return fnDoSave(this,'brandName');" />
	<probiz:iconBtn btnType="saveAndNext" onclick="return fnDoSaveAndNext(this,'brandName');" />
	<c:if test="${brand.brandId!=null}">
		<probiz:iconBtn btnType="delete" onclick="return fnDoDelete(this,'brandName');" />
	</c:if>
	<probiz:iconBtn btnType="back" onclick="return fnDoCancelForm(this);" />
</content>
<probiz:showBindErrors bindPath="brand.*" />

<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="brandDetail.heading"/></span></li>
	</ul>
</div>
<div class="modify">
<form id="brand" class="mainForm" action="${ctxPath}/product/brand.html" method="post" onsubmit="return validateBrand(this);">
	<input type="hidden" name="brandId" value="${brand.brandId}" />
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
		<tr>
			<th colspan="2" class="title"><h4><fmt:message key="brandDetail.group.basic"/><h4></th>
		</tr>
		<tr>
			<th class="label_width_1">
				<StoreAdmin:label key="brand.brandName" />
			</th>
			<td>
				<input type="text" name="brandName" id="brandName" value="${brand.brandName}" style="width:350px" class="inputtxt"/>
			</td>
		</tr>
		<tr>
			<th>
				<StoreAdmin:label key="brand.website" />
			</th>
			<td>
				<input type="text" name="website" id="website" value="${empty brand.website?'http://':brand.website}" style="width:350px" class="inputtxt"/>
			</td>
        </tr>
        <tr>
			<th>
				<StoreAdmin:label key="brand.sortOrder" />
			</th>
			<td>
				<input type="text" name="sortOrder" id="sortOrder" value="${empty brand.sortOrder?10:brand.sortOrder}" style="width:50px" class="inputtxt"/>
			</td>
		</tr>
		<tr>
			<th>
				<StoreAdmin:label key="brand.imageUrl" />
			</th>
			<td>
				
				<img id="logoImage" src="${mediaPath}${brand.imageUrl}"
					onerror="$j(this).attr('originsrc',this.src);this.onerror='';this.src=__defaultImage_brand"
					originsrc="" height="55" width="75" />
				( <fmt:message key="brand.imageUrl.desc" /> )
				<br />
				<input type="hidden" id="imageUrl" name="imageUrl" value="${brand.imageUrl}" />
            </td>
		</tr>
		
		<tr>
			<th colspan="2" class="title"><h4><fmt:message key="brandDetail.group.desc"/><h4></th>
		</tr>
        <tr>
			<th>
				<StoreAdmin:label key="brand.shortDescription" />
			</th>
			<td>
				<textarea  name="shortDescription" id="shortDescription" style="width:350px;height:150px;" class="textareatxt">${brand.shortDescription}</textarea>
            </td>
		</tr>
        <tr>
			<th>
				<StoreAdmin:label key="brand.fullDescription" />
			</th>
			<td>
				<textarea  name="fullDescription" id="fullDescription" style="width:350px;height:150px;" class="textareatxt">${brand.fullDescription}</textarea>
				<probiz:plugin_tip id="fullDescription_tip"><fmt:message key="description.tip" /></probiz:plugin_tip>
				<probiz:plugin_htmlEditor textareaIds="fullDescription"/>
            </td>
		</tr>
	</table>
</form>
</div>
<probiz:plugin_upload fileInputId="imageUrl" uploadFileTypes="jpg,gif,png" uploadCategory="other" onComplete="fnUploadLogoImagehandler" />
<v:javascript formName="brand" staticJavascript="false" />
<script type="text/javascript">
 function fnUploadLogoImagehandler(mediaUrl){
 	$j("#logoImage").get(0).src=__mediaPath+mediaUrl;
 }
</script>
